import Vue from 'vue'
import VueRouter from 'vue-router'
import Data1 from '../views/Data1.vue'
import Home from '../views/home.vue'
import FactorsData from '../views/factors_data.vue'
import Mobliedata2 from '../views/mobliedata2.vue'
import Mobliedata3 from '../views/mobliedata3.vue'
import Mobliedata1 from '../views/mobliedata1.vue'
import Mobliehome from '../views/mobliehome.vue'
import Mobliedata001 from '../views/mobliedata001.vue'
import Networth from '../views/netWorth.vue'
import Networth1 from '../views/netWorth1.vue'
import Test from '../views/test.vue'
import AccountList from '../views/AccountList.vue'
import Mystrategy from '../views/mystrategy.vue'
import Follow from '../views/follow.vue'
import Followtransaction from '../views/followtransaction.vue'
import Followtransaction1 from '../views/followtransaction1.vue'
import Followings from '../components/Followings.vue'
import Promote from '../views/promote.vue'
import Background from '../components/background.vue'
import testpay from '../views/testpay.vue'

Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/login' },
  {
    path: '/login',
    component: () => import('../views/login.vue'),
    hidden: true
  },
  { path: '/register', component: () => import('../views/register.vue') },
  { path: '/zhuce', component: () => import('../views/zhuce.vue') },
  { path: '/success', component: () => import('../views/success.vue') },
  { path: '/subscribe', component: () => import('../views/subscribe.vue') },
  { path: '/apply', component: () => import('../views/apply.vue') },
  { path: '/youke', component: () => import('../views/youke.vue') },
  { path: '/des', component: () => import('../views/description.vue') },
  { path: '/testpay', component: testpay },
  {
    path: '/mobliehome',
    component: Mobliehome,
    children: [
      {
        path: '/mobliedata2',
        component: Mobliedata2
      },
      {
        path: '/mobliedata3',
        component: Mobliedata3
      },
      {
        path: '/mobliedata1',
        component: Mobliedata1
      },
      {
        path: '/mobliedata001',
        component: Mobliedata001
      },
      {
        path: '/accountlist',
        component: AccountList
      },
      {
        path: '/mystrategy',
        component: Mystrategy
      }
    ]
  },
  {
    path: '/bg',
    component: Background,
    children: [
      {
        path: '/follow',
        component: Follow
      },
      {
        path: '/promote',
        component: Promote
      },
      {
        path: '/followings',
        component: Followings,
        children: [
          {
            path: '/followtrans',
            component: Followtransaction
          },
          {
            path: '/followtrans1',
            component: Followtransaction1
          },
          {
            path: '/networth',
            component: Networth
          },
          {
            path: '/networth1',
            component: Networth1
          }
        ]
      }
    ]
  },
  {
    path: '/factorslist',
    name: 'FactorsList',
    component: () => import('../views/FactorsList.vue')
  },
  {
    path: '/factors_data',
    component: FactorsData
  },
  {
    path: '/home',
    component: Home,
    children: [
      {
        path: '/data1',
        name: 'Data1',
        component: Data1
      },
      {
        path: '/data2',
        name: 'Data2',
        component: () => import('../views/data2.vue')
      },
      {
        path: '/data3',
        name: 'Data3',
        component: () => import('../views/data3.vue')
      },
      {
        path: '/k',
        name: 'K',
        component: () => import('../views/k.vue')
      },
      {
        path: '/strategy',
        name: 'Strategy',
        component: () => import('../views/strategy.vue')
      },
      { path: '/test', component: Test }
    ]
  }
]

const router = new VueRouter({
  routes,
  mode: 'hash',
  base: '/merchant'
})

export default router
